package com.yt.app.provider.service.impl;

import com.yt.app.core.interfaces.UserContactService;
import com.yt.app.core.model.UserContact;
import com.yt.app.provider.dao.UserContactDao;
import com.yt.core.dao.filter.DynamicSQLFilterImpl;
import com.yt.core.dao.filter.QueryFilter;
import com.yt.core.service.GenericServiceImpl;

import java.util.List;

public class UserContactServiceImpl extends GenericServiceImpl<UserContact, Long> implements UserContactService {
	private UserContactDao dao;

	public UserContactServiceImpl() {
	}

	public UserContactServiceImpl(UserContactDao dao) {
		super(dao);
		this.dao = dao;
	}

	@Override
	public List<UserContact> findByUID(Long uid){
		QueryFilter filter = new DynamicSQLFilterImpl();
		filter.setPagingBean(null);
		filter.addFilter("Q_uid_L_EQ", String.valueOf(uid));
		return this.dao.find(filter);
	}

}
